package com.juhui.macao;

import android.app.Application;

import com.bocmacausdk.sdk.BocAasPayManager;
import com.bocmacausdk.sdk.config.Environment;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;

public class MyApplication extends Application {

    public static BocAasPayManager getBocInstance() {
        return bocInstance;
    }

    private static BocAasPayManager bocInstance;
    private IWXAPI api;

    @Override
    public void onCreate() {
        super.onCreate();

        initBoc();
    }

    private void initBoc() {

//        api = WXAPIFactory.createWXAPI(this, "wxb66afb2f26ddb509", false);
//        // 将应用的appId注册到微信
//        api.registerApp("wxb66afb2f26ddb509");


        bocInstance = BocAasPayManager.getInstence(this);
        DebugLogUtil.getInstance().Debug(bocInstance == null ? "空" : "不空");
        if (bocInstance != null) {
            bocInstance.setEnvironment(Environment.CU);
            bocInstance.registerWechatPay("wxb66afb2f26ddb509");
        }

    }
}
